﻿<?xml version="1.0" encoding="utf-8" ?>
<config>
  <crmEntities>
    <crmEntity logicalName="account">
      <checkboxSet name="accountcampaigns" description="Provides a set of campaigns to associate with an account"
                   fakeSavingField="new_checkboxset_new_account_campaign"
                   relationshipName="new_account_campaign"
                   labelFieldName="name">
        <fetchXml>
          <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
            <entity name="campaign">
              <attribute name="campaignid"/>
              <attribute name="name"/>
              <order attribute="name" descending="true"/>
              <filter type="and">
                <condition attribute="statecode" operator="eq" value="0"/>
              </filter>
            </entity>
          </fetch>
        </fetchXml>
      </checkboxSet>

      <checkboxSet name="accountcategories" description="Provides a set of categories to associate with  an account"
                   fakeSavingField="new_checkboxset_new_new_category_account"
                   relationshipName="new_new_category_account"
                   labelFieldName="new_name">
        <fetchXml>
          <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
            <entity name="new_category">
              <attribute name="new_categoryid"/>
              <attribute name="new_name"/>
              <attribute name="new_order"/>
              <order attribute="new_order"/>
              <filter type="and">
                <condition attribute="statecode" operator="eq" value="0"/>
              </filter>
            </entity>
          </fetch>
        </fetchXml>
      </checkboxSet>
    </crmEntity>

    <crmEntity logicalName="contact">
      <checkboxSet name="contactcategories" description="Provides a set of categories to associate with a contact"
                   fakeSavingField="new_checkboxset_new_new_category_contact"
                   relationshipName="new_new_category_contact"
                   labelFieldName="new_name">
        <fetchXml>
          <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
            <entity name="new_category">
              <attribute name="new_categoryid"/>
              <attribute name="new_name"/>
              <attribute name="new_order"/>
              <order attribute="new_order"/>
              <filter type="and">
                <condition attribute="statecode" operator="eq" value="0"/>
              </filter>
            </entity>
          </fetch>
        </fetchXml>
      </checkboxSet>
    </crmEntity>
  </crmEntities>
</config>